tstr = input('')
if tstr[0] in ['f','F']:
    c = (float(tstr[1:])-32)/1.8
    print("C{:.2f}".format(c))
elif tstr[0] in ['c','C']:
    f = float(tstr[1:])*1.8+32
    print("F{:.2f}".format(f))
else:
    print('输入格式错误')